<div class="menu">
    <div class="wrapper">
        <ul id="menu">
            <li><a href="admin.html" <?php active('1',$active);?>>Home</a> </li>
            <li <?php active('2',$active);?>><?php echo $this->Html->link(__('Shop', true), array('controller' => 'part_categories',
                        'action' => 'index','admin'=>true)); ?> 
				<ul>
                    <li><a href="#">Offers</a> </li>
                    <li><?php echo $this->Html->link(__('Products', true), array('controller' => 'parts',
                        'action' => 'index','admin'=>true),array('class'=>active('2.b',$active,true))); ?></li>
					<li><?php echo $this->Html->link(__('Categories', true), array('controller' => 'part_categories',
                        'action' => 'index','admin'=>true),array('class'=>active('2.c',$active,true))); ?></li>
                </ul>
			</li>
            <li <?php active('3',$active);?>><?php echo $this->Html->link(__('Stocklist', true), array('controller'=>'Presses', 'action' => 'index')); ?>
                <ul>
                    <li><?php echo $this->Html->link(__('Presses', true), array('controller' => 'Presses',
                        'action' => 'index'),array('class'=>active('3.a',$active,true))); ?> </li>
                    <li ><?php echo $this->Html->link(__('Offers', true), array('controller' => 'Offers',
                        'action' => 'index'),array('class'=>active('3.b',$active,true))); ?> </li>
					<li ><?php echo $this->Html->link(__('Types', true), array('controller' => 'Types',
                        'action' => 'index'),array('class'=>active('3.c',$active,true))); ?> </li>
                </ul>
            </li>
            <li><a href="upcoming_auctions_staff.html">Auction</a>
                <ul>
                    <li><a href="#">Upcoming</a> </li>
                    <li><a href="#">Payments</a> </li>
                </ul>
            </li>
            <li><a href="#">Valuations</a> </li>
            <li><a href="#">Jobs</a> </li>
            <li><a href="admin.html">CRM</a>
                <ul>
                    <li><a href="#">Enquiries</a> </li>
                    <li><a href="#">Support</a> </li>
                    <li><a href="#" class="active">Customers</a> </li>
                    <li><a href="#">Companies</a> </li>
                    <li><a href="#">Agents</a> </li>
                    <li><a href="#">Engineers</a> </li>
                </ul>
            </li>
            <li <?php active('9',$active);?>><?php echo $this->Html->link(__('Contacts', true), array('controller'
                => 'contacts', 'action' => 'index')); ?>
                <ul>
                    <li><?php echo $this->Html->link(__('Contacts', true), array('controller' => 'contacts',
                        'action' => 'index'),array('class'=>active('9.a',$active,true))); ?> </li>                    
                    <li><?php echo $this->Html->link(__('Company', true), array('controller' => 'companies',
                        'action' => 'index'),array('class'=>active('9.b',$active,true))); ?> </li>
                </ul>
            </li>
            <li <?php active('10',$active);?>><?php echo $this->Html->link(__('Staff', true), array('controller'
                => 'staffs', 'action' => 'index')); ?>
                <ul>
                    <li><?php echo $this->Html->link(__('Staff', true), array('controller' => 'staffs',
                        'action' => 'index'),array('class'=>active('10.a',$active,true))); ?> </li>
                    <li ><?php echo $this->Html->link(__('User types', true), array('controller' => 'staff_types',
                        'action' => 'index'),array('class'=>active('10.b',$active,true))); ?> </li>
                </ul>
            </li>
            <li><a href="#">Finance</a> </li>
            <li><a href="#">Website</a> </li>
            <li><a href="#">Audit</a> </li>
        </ul>
        <div class="clear">
        </div>
    </div>
</div>
</div>
<div class="wrapper m_t_30">
    <div class="wrapper cornerAll">
<?php
	function active($value,$act,$a = false){		
		if ($value==$act ||  !(strpos($act,($value."."))===false)){
			if ($a) return "active";
			else echo 'class="active"';
		}
	}	
?>